package com.iotechn.unimall.data.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.iotechn.unimall.data.domain.IntegralUserDO;
import org.apache.ibatis.annotations.Param;


/**
 * 积分用户
 * 
 * @author chen
 * @email 
 * @date 2020-07-31 16:49:25
 */
public interface IntegralUserMapper extends BaseMapper<IntegralUserDO> {
    /**
     * 减少积分
     * @param userId
     * @param integral
     * @return
     */
    Integer decIntegral(@Param("userId") Long userId, @Param("integral") Integer integral);

    /**
     * 增加积分
     * @param userId
     * @param integral
     * @return
     */
    Integer incIntegral(@Param("userId") Long userId, @Param("integral") Integer integral);

}
